package com.xce.order.feign.fallback;

import com.xce.order.feign.ProductFeignClient;
import com.xce.product.entity.Product;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @ClassName ProductFeignClientFallback
 * @Description TODO
 * @Author lld
 * @Date 2025/7/1 19:12
 * @Version 1.0
 */
@Slf4j
@Component
public class ProductFeignClientFallback implements ProductFeignClient {
    @Override
    public Product getProductById(Long productId) {

        Product product = new Product();
        product.setId(0L);
        product.setPrice(new BigDecimal("0"));
        product.setProductName("未知项目");
        product.setNum(0);
        System.out.println("兜底回调。。。。");
        return product;
    }
}
